package multithreading.blockingQueueTest;

import java.util.concurrent.ArrayBlockingQueue;

public class Fooder extends Thread {
    ArrayBlockingQueue<String> quaua;

    public Fooder(ArrayBlockingQueue<String> quaua) {
        this.quaua = quaua;
    }

    @Override
    public void run() {
        while (true) {
            try {
                quaua.put("面条");
                System.out.println("厨师放了一个面条。");
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }

    }
}
